package com.lyc.wanandroid_kotlin.ui.fragment.mvp.contract

import com.lyc.wanandroid_kotlin.base.IModel
import com.lyc.wanandroid_kotlin.base.IPresenter
import com.lyc.wanandroid_kotlin.base.IView
import com.lyc.wanandroid_kotlin.bean.Article
import com.lyc.wanandroid_kotlin.bean.ArticleResponseBody
import com.lyc.wanandroid_kotlin.bean.Banner
import com.lyc.wanandroid_kotlin.bean.HttpResult
import io.reactivex.Observable

/**
 * ClassName:com.lyc.wanandroid_kotlin.ui.fragment.mvp.contract
 * Description:
 */
interface HomeContract {

    interface View : CommonContract.View {
        fun scrollToTop()

        fun setBanner(banners: List<Banner>)

        fun setArticles(articles: ArticleResponseBody)

    }

    interface Model : CommonContract.Model {
        fun requestBanner(): Observable<HttpResult<List<Banner>>>

        fun requestTopArticles(): Observable<HttpResult<MutableList<Article>>>

        fun requestArticles(num: Int): Observable<HttpResult<ArticleResponseBody>>
    }

    interface Presenter : CommonContract.Presenter<View> {
        fun requestBanner()

        fun requestHomeData()

        fun requestArticles(num: Int)
    }
}